package com.wxx.strategy;

import com.sun.xml.internal.ws.util.StringUtils;

/**
 * @author Jetwang
 * @version 1.0
 * @date 2022/5/25 20:05
 */
public class Test {
   /* public static void main(String[] args) {
        PromotionActivity activity618 = new PromotionActivity(new ManJianPromotionStrategy());
        PromotionActivity activity1111 = new PromotionActivity(new LiJianPromotionStrategy());
        activity618.executePromotionStrategy();
        activity1111.executePromotionStrategy();
    }*/

    /*public static void main(String[] args) {
        PromotionActivity activity = null;
        String promotionKey = "LiJian";
        if ("LiJian".equals(promotionKey)) {
            activity = new PromotionActivity(new LiJianPromotionStrategy());
        } else {
            activity = new PromotionActivity(new ManJianPromotionStrategy());
        }
        activity.executePromotionStrategy();
    }*/

    public static void main(String[] args) {
        PromotionActivity activity = null;
        String promotionKey = "ManJianxxx";
        activity = new PromotionActivity(new PromotionStrategyFactory().getPromotionStrategy(promotionKey));
        activity.executePromotionStrategy();
    }
}
